package com.xmy.studentmanager.mapper;

import com.xmy.studentmanager.pojo.Grade;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: xmy
 * @Date: 2019-04-23 14:33
 * @Version 1.0
 */
public interface GradeMapper {

    @Select("select * from grade where gradeId = #{gradeId}")
    @Results({
            @Result(property = "gradeName",column = "gradeName")
    })
    Grade selGradeNameById(Integer id);

    @Select("select * from grade")
    List<Grade> selAllGrade();
}
